This application is based on Japanese Patent Application No. 2008-246408 filed with the Japan Patent Office on Sep. 25, 2008, the entire content of which is hereby incorporated by reference.
1. Technical Field
The present invention relates to an image processing device and an image processing method for generating a synthetic image data with enlarged dynamic ranges by using a plurality of image data obtained by photographing a photographing range a plurality of times under different exposure conditions.
2. Related Art
In the field of FA (Factory Automation) and the like, a so-called visual sensor is being put to practical use as a device for optically testing defects and the like produced in the measuring article such as a workpiece and for optically measuring the size of the defects and the like.
When performing tests and measurements using such a visual sensor, the measuring article needs to be appropriately photographed. The dynamic range (tone range where light can be detected) of the imaging element such as a CCD (Coupled Charged Device) and CIS (Complementary Metal Oxide Semiconductor Image Sensor) is generally finite. Thus, when the exposure time at the time of photographing becomes long, whiteout (halation) is entirely or partially produced, and the luminance and the color information of the measuring article cannot be accurately acquired. When the exposure time at the time of photographing becomes short, total underexposure entirely or partially occurs, and an effective luminance cannot be acquired. Furthermore, in the measuring article having portions where the reflectivity locally differs and the measuring article having portions of large curvature, partial whiteout and total underexposure occur under the influence of lighting and the like.
Thus, if the difference between the minimum value and the maximum value of the light power (light energy that enters per unit time) radiated from the same measuring article exceeds the dynamic range of the imaging element, the entire measuring article cannot be appropriately photographed.
A technique of enlarging the dynamic range by photographing the same measuring article plurality of times under different exposure conditions, and synthesizing a plurality of image data obtained therefrom is known. Such a process is also referred to as a high dynamic synthesizing process or super latitude process (SL process). For instance, Japanese Laid-Open Patent Publication No. 2002-334326 discloses a visual sensor that realizes enlargement of the dynamic range with small calculation processing load.
The solar light is often taken in as part of the lighting in a factory with the increased consciousness in recent environmental problems such as reduction of carbon dioxide. For instance, a skylight may be disposed at the roof of the factory so that the solar light can be taken into the factory from the skylight.
Taking in the solar light should be recommended from the standpoint of saving energy, but may become a disturbance factor for the visual sensor. In other words, the brightness of the solar light greatly fluctuates depending on the time zone (day and night), season, and the like. When such solar light is emitted on the measuring article, the light power radiated from the visual sensor temporally changes.
Generally, appropriate photographing conditions, judgment conditions, and the like are tuned under a certain photographing environment with such a visual sensor, but the set values thereof will become inappropriate if the photographing environment changes from the time of tuning.
When the photographing environment changes, the synthetic image data including effective image information may not be generated from the measuring article.